<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="description" content="">
	<meta name="author" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	<title>Potree Viewer</title>

	<link rel="stylesheet" type="text/css" href="../build/potree/potree.css">
	<link rel="stylesheet" type="text/css" href="../libs/jquery-ui/jquery-ui.min.css">
	<link rel="stylesheet" type="text/css" href="../libs/openlayers3/ol.css">
	<link rel="stylesheet" type="text/css" href="../libs/spectrum/spectrum.css">
	<link rel="stylesheet" type="text/css" href="../libs/jstree/themes/mixed/style.css">
</head>

<body>
	<script src="../libs/jquery/jquery-3.1.1.min.js"></script>
	<script src="../libs/spectrum/spectrum.js"></script>
	<script src="../libs/jquery-ui/jquery-ui.min.js"></script>
	<script src="../libs/three.js/build/three.min.js"></script>
	<script src="../libs/three.js/extra/lines.js"></script>
	<script src="../libs/other/BinaryHeap.js"></script>
	<script src="../libs/tween/tween.min.js"></script>
	<script src="../libs/d3/d3.js"></script>
	<script src="../libs/proj4/proj4.js"></script>
	<script src="../libs/openlayers3/ol.js"></script>
	<script src="../libs/i18next/i18next.js"></script>
	<script src="../libs/jstree/jstree.js"></script>
	<script src="../build/potree/potree.js"></script>
	<script src="../libs/plasio/js/laslaz.js"></script>
	
	<!-- INCLUDE ADDITIONAL DEPENDENCIES HERE -->
	<!-- INCLUDE SETTINGS HERE -->
	
	<div class="potree_container" style="position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; ">
		<div id="potree_render_area" style="background-image: url('../build/potree/resources/images/background.jpg');"></div>
		<div id="potree_sidebar_container"> </div>
	</div>
	
	<script>
	
		window.viewer = new Potree.Viewer(document.getElementById("potree_render_area"));
		
		viewer.setEDLEnabled(true);
		viewer.setDescription("Adding a custom section to the sidebar");
		
		viewer.loadGUI(() => {
			viewer.toggleSidebar();
			
			let section = $(`
				<h3 id="menu_meta" class="accordion-header ui-widget"><span>Metadata</span></h3>
				<div class="accordion-content ui-widget pv-menu-list"></div>
			`);
			let content = section.last();
			content.html(`
			<div class="pv-menu-list">
				A custom Section in the sidebar!<br>
				<br>	
				Uncomment "content.hide();" to hide content by default.<br>
				<br>
				Take a look at src/viewer/sidebar.html and sidebar.js to 
				learn how the other sections were populated.
			</div>
			`);
			section.first().click(() => content.slideToggle());
			section.insertBefore($('#menu_about'));
			
		});
		
		Potree.loadPointCloud("../pointclouds/vol_total/cloud.js", "Sorvilier", e => {
			viewer.scene.addPointCloud(e.pointcloud);
			viewer.fitToScreen();
		});
		
	</script>
	
	
  </body>
</html>
